package com.xunker.appointment.model.hospital;

import com.xunker.appointment.model.base.BaseMongoEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@ApiModel(description = "Department")
@Document("Department")
public class Department extends BaseMongoEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "医院编号")
    @Indexed //普通索引
    private String hospitalCode;

    @ApiModelProperty(value = "科室编号")
    @Indexed(unique = true) //唯一索引
    private String departmentCode;

    @ApiModelProperty(value = "科室名称")
    private String departmentName;

    @ApiModelProperty(value = "科室描述")
    private String intro;

    public Department() {
    }

    public Department(String hospitalCode) {
        this.hospitalCode = hospitalCode;
    }

    @ApiModelProperty(value = "大科室编号")
    private String bigCode;

    @ApiModelProperty(value = "大科室名称")
    private String bigName;

}